package com.umgsai.wx.backend.test;

public class FrogWays {

    public static void main(String[] args) {
        System.out.println(wayCounts(3));
    }

    public static int wayCounts(int n) {
        if (n == 0) {
            return 1;
        }
        if (n == 1) {
            return 1;
        }
        if (n == 2) {
            return 2;
        }
        int a = 1, b = 2, totalCount = 0;
        for (int i = 3; i <= n; i++) {
            totalCount = (a + b) % 1000000007;
            a = b;
            b = totalCount;
        }
        return totalCount;
    }

}
